1. Field of the Invention
The present invention relates to an edge correction apparatus for a digital video camera and, more particularly, to an edge correction apparatus for a digital video camera that can sharpen an image without degrading the image quality.
2. Description of the Prior Art
Edge correction apparatuses for conventional digital camera systems are disclosed in, e.g., Japanese Unexamined Patent Publication No. 6-14190, Japanese Unexamined Utility Model Publication No. 9-261, and “Digital Signal Processing for Single-CCD Video Camera”, ITE Technical Report, Vol. 15, No. 7. FIG. 1 is a block diagram showing the arrangement of a part related to edge correction of a conventional CCD digital video camera having a general primary color Bayer layout color filter as shown in FIG. 2. Respective squares in FIG. 2 represent pixels, and letters “R”, “G”, and “B” mean the colors of color filters on corresponding pixels. Note that R means a red filter; G, a green filter; and B, a blue filter. Figures in some pixels are used to identify the positions of respective pixels for the following description.
In FIG. 1, an image projected on an image sensing element 101 via a lens is photoelectrically converted into a signal current within the image sensing element. The signal current is converted from an analog signal into a digital signal via an A/D converter 102, and undergoes various processes in order to obtain a normal natural image. First, the digital signal is subjected to processing of making the black level of an image uniform by an OB clamping processor 103, and then separated into R, G, and B color signals by a color separation processor 104. This color separation processing will be described. In color separation processing, arithmetic processing using convolution filters as represented by the following equations (1) to (5) is done for pixel positions on arbitrary 3 columns×3 rows. The arithmetic operations are switched in accordance with which of R, G, and B pixel positions corresponds to a target pixel.                     a        =                  [                                                    0                                            0                                            0                                                                    0                                            1                                            0                                                                    0                                            0                                            0                                              ]                                    (        1        )                                b        =                              1            2                    ⁡                      [                                                            0                                                  1                                                  0                                                                              0                                                  0                                                  0                                                                              0                                                  1                                                  0                                                      ]                                              (        2        )                                c        =                              1            2                    ⁡                      [                                                            0                                                  0                                                  0                                                                              1                                                  0                                                  1                                                                              0                                                  0                                                  0                                                      ]                                              (        3        )                                d        =                              1            4                    ⁡                      [                                                            1                                                  0                                                  1                                                                              0                                                  0                                                  0                                                                              1                                                  0                                                  1                                                      ]                                              (        4        )                                e        =                              1            4                    ⁡                      [                                                            0                                                  1                                                  0                                                                              1                                                  0                                                  1                                                                              0                                                  1                                                  0                                                      ]                                              (        5        )            
When the color of a pixel processed at given time during color signal processing is R, equations (1) to (5) yield:                R output: arithmetic result of equation (1)        G output: arithmetic result of equation (5)        B output: arithmetic result of equation (4)When the color is G on a GR line,        R output: arithmetic result of equation (3)        G output: arithmetic result of equation (1)        B output: arithmetic result of equation (2)When the color is G on a GB line,        R output: arithmetic result of equation (2)        G output: arithmetic result of equation (1)        B output: arithmetic result of equation (3)When the color is B,        R output: arithmetic result of equation (4)        G output: arithmetic result of equation (5)        B output: arithmetic result of equation (1)        
In color separation processing, an arbitrary pixel on the screen is arithmetically processed with pixels on immediately preceding and subsequent lines. For this purpose, two delay lines 115 and 116 are generally required to delay a pixel signal by one horizontal period. Recently, these delay lines 115 and 116 are generally formed from FIFO (First-In First-Out) memories. After color separation processing, color correction processing (matrix processing) is executed by a color correction processor 105 in order to make the spectral characteristics of an image signal mainly determined by a color filter attached to the image sensing element 101 match NTSC standard spectral characteristics. Further, various processes are performed: white balance processing by a white balance processor 106; gamma processing by a gamma processor 107 for making the characteristics of an image signal match the display characteristics of a cathode-ray tube for displaying an image; and clipping processing by a white/black clipping processor 108 for cutting the upper and lower limits of an image signal at predetermined values. As a result, a video signal is formed.
Reference numeral 121 denotes an edge correction processing means. The function of this edge correction processing means 121 will be described in detail below. Processing by the edge correction processing means 121 is necessary to emphasize the sharpness of an output image and compensate for response degradation of the optical system and image sensing device. The horizontal and vertical edge signals of an image are extracted, and multiplied by constants, respectively. The products are added to the original signal to emphasize the edge component of the image, thereby increasing the sharpness.
To downsize the circuit and simplify processing, an edge signal is generated by an out-of-green method using only a green signal approximately regarded as a luminance signal and green signals obtained by delaying the luminance signal by one horizontal line and two horizontal lines. For the same reason, processing by the edge correction processing means 121 is divided into horizontal edge correction processing of emphasizing and correcting the horizontal edge component of an image and vertical edge correction processing of emphasizing and correcting the vertical edge component. In FIG. 1, input signals to the edge correction processing means 121 are a green signal G0 output from the color separation processor 104, and green signals G1 and G2 obtained by delaying the green signal G0 by one horizontal line and two horizontal lines, respectively. An output signal from the edge correction processing means 121 is obtained as an edge correction output d, which is added by adders 122, 123, and 124 with main processing signals having undergone white balance processing.
The respective functional blocks of the edge correction processing means 121 in FIG. 1 will be explained. In the edge correction processing means 121, a horizontal edge signal generator 109 performs horizontal edge processing, and a vertical edge signal generator 111 performs vertical edge processing. Horizontal and vertical edge signal gain controllers 110 and 112 control the gains of outputs from the generators 109 and 111. An adder 117 adds the gain-adjusted edge signal outputs, a gain controller 113 controls the gain of the whole edge signal, and a slice processor 114 executes slice processing for the control signal. In slice processing, a generated edge signal is cut at a predetermined level or less because a small-amplitude portion is mainly occupied by a noise component to decrease the S/N ratio.
The operations of the horizontal and vertical edge signal generators 109 and 111 as the most important processing items of edge correction processing will be explained in detail. A horizontal edge signal is generally generated by arithmetic processing between horizontally adjacent pixel components on a screen using the color-separated green signal G1. This is shown in FIG. 3. In FIG. 3, reference numerals 21 and 22 denote flip-flops (FF) for holding a pixel signal during one pixel period. The flip-flops 21 and 22 are used to perform the following arithmetic processing between pixel signals. That is, the green output G1 from the color separation processor 104 is input to a multiplier 23 and the flip-flop 21.
An output from the flip-flop 21 is input to a multiplier 24 and the flip-flop 22. An output from the flip-flop 22 is input to a multiplier 25. The multipliers 23, 24, and 25 multiply the outputs by coefficients of −1, 2, and −1, respectively. After outputs C1, C2, and C3 from the multipliers 23, 24, and 25 are added by an adder 26, the sum is output as a horizontal edge signal a via a 1/2-level shift circuit 27. This arithmetic processing is given by the following equation. Letting G02 be a signal delayed by one pixel from the signal G01 of a given pixel on the screen, and G03 be a signal delayed by two pixels, a horizontal edge signal Gh_dtl is given byGh_dtl=1/2(−G01+2×G02−G03)  (6) 
On the other hand, a vertical edge signal is generated by arithmetic processing between vertically adjacent pixel components in the frame using the green signals G1 and G2 obtained by delaying the green signal G0 by one horizontal period and two horizontal periods, respectively. This is shown in FIG. 4. In general, the green signals G1 and G2 are simultaneously generated by the color separation processor 104. In practice, the green signals G1 and G2 are extracted as two green signal outputs G0+G2 and G1, which are generally used for vertical edge processing. Note that FIG. 1 separately shows the green signals G0, G1, and G2.
When the color of a pixel processed at given time during color signal processing is R or B, the color separation processor 104 outputs these green signals G0, G1, and G2 asG0+G2: arithmetic result of equation (2) G1: arithmetic result of equation (3) When the color is G,G0+G2: arithmetic result of equation (4) G1: arithmetic result of equation (1) Using these green signals G0, G1, and G2, the following arithmetic processing between pixel signals is executed. The green signals G0, G1, and G2 are respectively input to multipliers 31, 32, and 33, and multiplied by coefficients of −1, 2, and −1. After outputs C4, C5, and C6 from the multipliers 31, 32, and 33 are added by an adder 34, the sum is obtained as a vertical edge signal b via a 1/2-level shift circuit 35. This arithmetic processing is given by the following equation. Letting G05 be a signal delayed by one horizontal period from the signal G04 of a target pixel, and G06 be a signal delayed by two horizontal periods, a vertical edge signal Gv_dtl is given byGv—dtl=1/2(−G04+2×G05−G06)  (7) 
After that, the gains of the horizontal and vertical edge signals are properly changed and added to attain a final edge signal. Note that each arithmetic processing may be done not only between three adjacent pixels, but also between five or seven adjacent pixels to form an edge signal.
Letting G(n) be the output value of a green signal at a pixel position n in a CCD digital video camera system having a primary color Bayer layout color filter as shown in FIG. 2, a vertical edge signal Dtlv(5) at pixel position 5 in FIG. 2 corresponding to a green color filter is given from the above description and equations (1) to (7):Dtlv(5)=G(5)−1/2(G(2)+G(8))=G(5)−1/2(1/2(G(1)+G(3))+1/2(G(7)+G(9)))=G(5)−1/4(G(1)+G(3)+G(7)+G(9))  (8) This equation similarly applies to pixel positions 1, 3, 7, 9, and 11 as pixel positions corresponding to other green color filters except that the relative positions of corresponding pixels in equation (8) shift.
A vertical edge signal Dtlv(8) at pixel position 8 in FIG. 2 corresponding to a red color filter is given from the above description and equations (1) to (7):Dtlv(8)=G(8)−1/2(G(5)+G(11))=1/4(G(5)+G(7)+G(9)+G(11))−1/2(G(5)+G(11))=1/4((G(7)+G(9))−(G(5)+G(11)))  (9) This equation similarly applies to pixel position 2 as a pixel position corresponding to another red color filter except that the relative position of a corresponding pixel in equation (9) shifts. Equation (8) similarly applies to pixel positions 4, 6, 10, and 12 as pixel positions corresponding to other blue color filters except that the relative positions of corresponding pixels in equation (8) shift.
FIG. 5 is a view showing an example of a CCD direct output value before color separation processing when the color filter is attached to a CCD having a primary color Bayer layout. Respective squares in FIG. 5 represent pixels as in FIG. 2, and figures in these squares indicate the output values of respective pixels. In this case, the output value range is 8 bits, which are represented by an integer of 0 to 255. In FIG. 5, pixel outputs on the left side with respect to a certain vertical boundary have a minimum value of 0, and pixel outputs on the right side have a maximum value of 255. FIG. 6 is a view showing an output value when a vertical edge signal is generated from signals having values shown in FIG. 5 by processing given by equations (8) and (9). At this time, the vertical edge signal takes a positive/negative value. For an 8-bit input signal, the signal range is 9 bits, which are represented by an integer of −256 to 255.
The edge correction apparatus for the conventional CCD digital video camera operates in combination with the color separation processor 104. When the output difference between pixels is 0 in the vertical direction, but the difference in output value between horizontally adjacent pixels is large, as shown in FIGS. 5 and 6, an edge signal which should not exist vertically is generated by processing given by equations (8) and (9) though the output values of respective pixels in FIG. 6 are ideally 0. This problem arises in another situation, in addition to the case in which the output difference between pixels is very large, as shown in FIG. 5. However, this problem does not occur for a television signal whose three primary colors match with each other.